function Little(){};

$.extend(Little.prototype,{
    init : function(){
        this.category = document.querySelector(".fixed-header");
        this.hiddenFloor = document.querySelector(".floor5");

        window.addEventListener("scroll",this.scrollHandler.bind(this));
        this.hiddenFloor.addEventListener("click",this.clickHandler.bind(this));

    },
    scrollHandler : function(){
        if(document.documentElement.scrollTop > 182){
            this.category.style.top = 0;
        }
        else if(document.documentElement.scrollTop <= 182){
            this.category.style.top = -42 + "px";
        }
        if(document.documentElement.scrollTop > 0){
            this.hiddenFloor.style.display = "block";
        }
        else if(document.documentElement.scrollTop === 0){
            
            this.hiddenFloor.style.display = "none";
        }

    },
    clickHandler : function(){
        document.documentElement.scrollTop = 0;
    },
    floorHandler : function(){
        console.log(this);
    }
})

export default new Little();